package com.example;

import org.greenrobot.greendao.generator.DaoGenerator;
import org.greenrobot.greendao.generator.Entity;
import org.greenrobot.greendao.generator.Schema;

import java.io.IOException;

public class MyClass {
    public static final String DAO_PATH = "C:/AndroidStudioProjects/AcFun/app/src/main/java";
    public static final String PACKAGE_NAME = "com.poul.acfun.ac_model.bean";
    public static final int VERSION = 1;

    public static void main(String[] args) throws Exception {
        Schema schema = new Schema(VERSION, PACKAGE_NAME);
        addDao(schema,"WelcomeImageBean");
        addDao(schema,"PushEntry");
        new DaoGenerator().generateAll(schema,DAO_PATH);
    }

    private static void addDao(Schema schema,String name){
        Entity entity = schema.addEntity(name);
        entity.addIdProperty().autoincrement();
        entity.addStringProperty("JsonString");
        entity.addLongProperty("date");
    }
}
